import request from "@/utils/request";
const Base=process.env.VUE_APP_BASE_API;

// 查询感知底座-----物联网数据列表
export function listDevice(query) {
  return request({
    url: `${Base}/base/smart/list`,
    method: "post",
    data: query,
  });
}

// 查询感知底座-----物联网数据详细
export function getDevice(id) {
  return request({
    url: `${Base}/base/smart/` + id,
    method: "get",
  });
}

// 新增感知底座-----物联网数据
export function addDevice(data) {
  return request({
    url: `${Base}/base/smart`,
    method: "post",
    data: data,
  });
}

// 修改感知底座-----物联网数据
export function updateDevice(data) {
  return request({
    url: `${Base}/base/smart`,
    method: "put",
    data: data,
  });
}

// 删除感知底座-----物联网数据
export function delDevice(id) {
  return request({
    url: `${Base}/base/smart/` + id,
    method: "delete",
  });
}

// 查询部门权属单位-----物联网数据
export function getCompanyList(status) {
  return request({
    url: `${Base}/system/dept/treeselect?status=0`,
    method: "get",
  });
}
// 查询所有权属单位-----物联网数据
export function getAllCompanyList(status) {
  return request({
    url: `${Base}/system/dept/treeselectAll?status=0`,
    method: "get",
  });
}

// 查询有视频的权属单位-----物联网数据
export function getHasRegistrationDept() {
  return request({
    url: `${Base}/base/registration/getHasRegistrationDept`,
    method: "get",
  });
}